Computer do not hibernate when battery drained off

Hi!!


The computer do not hibernates when the battery is drained off. I think it is a configuration / software issue, because I recently erase de content of the disk and created a new user. In that configuration the computer performed the hibernation and the end of the battery.


These are my pmset configuration.


Active Profiles:

Battery Power 1*

AC Power -1

Currently in use:

standbydelay 4200

standby 0

halfdim 1

sms 1

hibernatefile /var/vm/sleepimage

gpuswitch 2

disksleep 10

sleep 10 (sleep prevented by Google Chrome)

hibernatemode 3

ttyskeepawake 1

displaysleep 2

acwake 0

lidwake 1



Active Profiles:

Battery Power 1

AC Power -1*

Currently in use:

standbydelay 4200

standby 0

womp 1

halfdim 1

hibernatefile /var/vm/sleepimage

gpuswitch 2

sms 1

networkoversleep 0

disksleep 10

sleep 0 (sleep prevented by Google Chrome)

hibernatemode 3

ttyskeepawake 1

displaysleep 10

acwake 0

lidwake 1


I also have setup a fusion drive, replacing the superdrive for a SSD.


Does someone know what is going on?


Thanks!

MacBook Pro (15-inch Late 2011), OS X Mavericks (10.9.2), 2.5 GHz i7, 16GB, 700GB

Posted on Nov 13, 2014 8:44 AM

Reply
20 replies

Nov 16, 2014 11:22 PM in response to BobHarris

Hey!!


Thanks a lot for the reply!

I have installed right now caffeine and insomniax, but they are not running always, and they are not running when I am trying to see if the computer hibernates or not. I am totally aware that they can stop the sleep if they are running, but can they stop the hibernation if the computer run out of battery?

My energy settings on battery are these ones:

User uploaded file

The battery is new. They just install it last monday.


I think there is something in the OS configuration. Before I sent the computer to service to change the battery, I delete everything and install a clean copy of mavericks and I create just a user for the service. With that user the computer hibernated.


When the computer was back, I delete everything again and restored from time machine. No hibernation again. I create a new user, no hibernation either.


Today I am calibrating the battery for the first time... let's see.


PS/ When the computer have just 10 minutes of battery a banner appears warning me... then no more warnings, just switch off.

Nov 22, 2014 3:50 AM in response to lpuerto

The only difference is, it asked me for my password, when normally it does not because I have the automatic login to my account enable.

If you have whole disk encryption via Mac OS X's FileVault, it will ask for the password in order to unlock the disk before a cold boot.


Or if you have the Mac set to ask for your password after going into the screen saver, it should ask for the password when restoring from a SleepImage (I think, as I rarely get into a situation where I've run my battery all the way down to zero - it has happened, but not enough for me to remember exactly what I saw).



Wiping your system is an option, however, I am unsure as to what it will do. So for what "I think", it might be best to not trust my opinion on something as drastic as wiping and reinstalling 🙂

I am thinking to delete everything and install mavericks again.

Make sure you have a copy of Mavericks "BECAUSE" it is NO longer available from the App Store. You can only get Yosemite.


AND NOT MATTER WHAT, make sure you have a backup (I am the paranoid type and make sure I have 2 working backups before I ever attempt wiping my boot disk). I like SuperDuper and Carbon Copy Cloner for my backups whenever I do a system upgrade or disk replacement. Wiping the system is like a disk replacement. And test that the clones boot.


Then load everything from my backup except the system preferences.

The energy and hibernation rules come from the system preferences, not from the user preferences, right?

I am unsure where they are set. And 'pmset' may exist in power management or PRAM

<OS X Mavericks: Reset your computer’s PRAM>

<Intel-based Macs: Resetting the System Management Controller (SMC) - Apple Support>


But if you do decide to install from scratch, why not run a test without restoring. Run your test on a clean system, or install just enough to run your test. Do not pulling any of your other stuff until the test is over. That way you know if it is part of the Mac hardware (PRAM and SMC on-chip settings are part of the hardware), or if it is software or software configuration files that are sitting on your backup.

Other option would be reinstall the system over the one I have here, but I do not really know if it could work. What do you think?

Still make sure you have a backup (again I'm paranoid and always have 2).


Installing over the existing system is less drastic than wiping and installing new. I've heard of installing over the existing system being helpful for some, however, I cannot say from experience exactly what it does. If you make good backups, it will most likely be the least drastic of the install ideas.

Nov 22, 2014 4:38 AM in response to BobHarris

As I told you... I have already done something like that. Wipe all and install a clean copy of Mavericks. Then in a new user, without bring anything from my backup I leaved run off of battery... At least in that occasion I saw the bar

User uploaded file


However, in that occasion I cannot say how it waked up... I sent it straight away to service.


And yeah! I have a usbstick with mavericks 🙂

Nov 22, 2014 9:09 AM in response to BobHarris

Just a little theory...

As I told you, I have a fusion drive created... with the HDD in the optibay and the SSD in the regular drive bay.... I have read that there is some problems if you have this setup Fusion Drive on Macbook Pro & Hibernation problem.


I think that it could be cause because I have the SSD totally full except for the 4gb buffer. Then the system perform the sleepimage is storage in both disks due to its size, more than 4 gb.


When the mac wake up from safesleep tries to find the sleep image but it cannot be found because it is in both disk and the HDD does not have energy yet....


Am I right?


Thanks!

Nov 24, 2014 6:14 AM in response to lpuerto

Based on the link you provided, it seems you are not alone with having Fusion/Hibernate problems.


If you haven't tried the PRAM reset and SMC reset, I would give them a try (based on the link you found, not sure that will help, but it will not hurt either).


If a home grown Fusion drive will not hibernate, I think you need to decide if you want Fusion or Hibernate more.


Keeping Fusion, assuming hibernate cannot be made to work, then you just need to stop running your battery down to zero, or when you think you might, make sure you save all your work so you do not loose anything.


If you want to stop using Fusion, then I see 3 options.


1) Put the OS and Apps on the SSD (assuming it is large enough), put your home Folder on the hard disk (variation on the theme is to just put your big folders on the hard disk (iPhoto, iTunes, etc...; these apps even have a preference to point to a different folder on another disk; for other large folders you may need to learn about Unix Symbolic Links).


2) Replace the SSD with a large enough SSD to hold everything, and either ignore the hard disk, or use it for backup, or use it for bulk storage.


3) Replace the HDD with another SSD and again balance your storage usage between the 2 disk using things like iTunes and iPhone preferences and Unix Symlinks.


You could also keep digging to figure this out, but keep in mind that every time you deep discharge your battery, especially just for testing, you reduce its overall life.

Nov 14, 2014 2:12 PM in response to Eric Root

Right now i m on battery and with chrome open:


Active Profiles:

Battery Power -1*

AC Power -1

Currently in use:

standbydelay 4200

standby 0

halfdim 1

sms 1

hibernatefile /var/vm/sleepimage

gpuswitch 2

disksleep 10

sleep 10

hibernatemode 3

ttyskeepawake 1

displaysleep 2

acwake 0

lidwake 1


These is weird!!!


Why could chrome prevent the computer from sleep - hibernate?


By the way... hibernate is the same as sleep?

Nov 14, 2014 4:02 PM in response to lpuerto

By the way... hibernate is the same as sleep?

No.


Sleep keeps power to RAM so when you wake, so there is slight power drain while asleep. But waking up a sleeping Mac is fast.


Hibernate, writes the contents of RAM to /private/var/vm/SleepImage, and then zero power is used. When the Mac is started backup, you have to wait while RAM is repopulated from the SleepImage. This is slower than a sleeping Mac (although if you have an SSD, it is not too slow).


A sleeping Mac will eventually drain the battery to zero. By default, when a Mac goes to sleep, it also writes RAM to SleepImage, so if the battery does die while asleep, the Mac will then use the SleepImage.


A hibernating Mac can keep a charge for a very long time, as it is not using any power at all. The battery will eventually loose power as any battery will if you leave it uncharged for a long enough period of time (months/years).

Nov 15, 2014 8:14 AM in response to lpuerto

The computer do not hibernates when the battery is drained off. I think it is a configuration / software issue, because I recently erase de content of the disk and created a new user. In that configuration the computer performed the hibernation and the end of the battery.

Do you have any utilities such as SmartSleep, which will play with the Sleep and Hibernate settings dynamically?

Do you have system preferences -> energy saver -> battery -> computer sleep -> Never?


If not, then by default, the Mac should go to sleep when the battery gets to a minimum power level. In going to sleep, it should create a SleepImage, so that if the battery dies when it is asleep it will still preserve the state of the Mac.


However, if the battery is dying suddenly before it reaches the threshold where the Mac would go to sleep, then the Mac will not have a chance to go to sleep and create a SleepImage.


Some batteries fail in such a way that they say they have nn%, then when they hit nn-1%, they die. It is possible your Mac's battery is not degrading its charge in a predictable way, and the Mac does not know it should go to sleep.


It is also possible that you have an app running that is telling the Mac to not sleep. This would NOT have anything to do with the pram settings you have been displaying, it would just be telling the operating system that it is busy doing something and thus the OS should not sleep just now. I do not know if would stop the battery very low forced sleep or not. I'm speculating on that.


My best guess is that your battery is not correctly reporting when it is about to run out of power.

Nov 17, 2014 5:57 AM in response to lpuerto

PS/ When the computer have just 10 minutes of battery a banner appears warning me... then no more warnings, just switch off.

Looking a little more at your pmset values hibernatemode=3 is the standard default for a Mac laptop, so that mostly leaves software "maybe" interfering (and I really do not know that it could really interfere), and the battery and the OS not being clear on just when power is going to stop.


Hopefully battery recalibration will resolve the issue.


From "man pmset"

...

hibernatemode = 3 (binary 0011) by default on supported portables. The
system will store a copy of memory to persistent storage (the disk), and
will power memory during sleep. The system will wake from memory, unless
a power loss forces it to restore from disk image.

...

That last reference to "power loss forces" is talking about when you put your Mac to sleep and leave it sleeping so long that the "power memory during sleep" finally drains the battery to empty. It does not refer to the situation you are experiencing where you Mac is not going to sleep before loosing power.


You might check the following. Put your Mac to sleep. Wake it backup. Now use the Terminal and see if you have a sleepimage file:


ls -l /var/vm

-rw------- 1 root wheel 67108864 Nov 6 10:15 swapfile0

-rw------- 1 root wheel 1073741824 Nov 6 10:15 swapfile1

-rw------T 1 root wheel 8589934592 Nov 17 08:54 sleepimage


You should see one or more swapfile(s) and sleepimage. If you do not see sleepimage, that might also indicate a problem creating the sleepimage, and since your battery is already nearly empty when the Mac tries to go to sleep, maybe it is not longer after, that it dies without a sleepimage to restore from.


NOTE: sleepimage is going going to be big. The one above, from my Macbook Pro, is 8+ gigabytes. It could be even larger as I have 16GB of RAM in my Macbook Pro. So you need to have enough free storage on your Mac to create the sleepimage.

Nov 17, 2014 10:38 PM in response to BobHarris

Seems that it is totally able to create the sleep image:

Last login: Tue Nov 18 08:10:27 on console

MBP-lpuerto:~ lpuerto$ ls -l /var/vm

total 4325376

-rw------T 1 root wheel 1073741824 18 Nov 00:07 sleepimage

-rw------- 1 root wheel 67108864 18 Nov 08:10 swapfile0

-rw------- 1 root wheel 1073741824 18 Nov 08:10 swapfile1

MBP-lpuerto:~ lpuerto$

It is not the first one I see in that directory. I have deleted some before, just in hope that the problem is that it was not able to create the image.

Yesterday, I leave it to die and just died at the time 00:07. I really do not know what it did yesterday. It suddenly like turn off the screen and seems like it was going to sleep. The fans were still working and I was able to heard some sounds in the inside of the computer. It stopped and I tried to turn it on again without plug it in .... just a little bit of more sound, but not screen. Then I plug it in, and in 5 seconds the screen turned on with the same content I was working 😕


The thing is, I do not see in any moment how it creates the image, like this, which I have seem before. And in previous attempts I heard the start sound and it was very crear that it started from scratch.


PS/ I have turn on the standby mode.


MBP-lpuerto:~ lpuerto$ pmset -g

Active Profiles:

Battery Power -1

AC Power -1*

Currently in use:

standbydelay 4200

standby 1

womp 1

halfdim 1

hibernatefile /var/vm/sleepimage

gpuswitch 2

sms 1

networkoversleep 0

disksleep 10

sleep 0 (sleep prevented by apsd, Google Chrome)

hibernatemode 3

ttyskeepawake 1

displaysleep 10

acwake 0

lidwake 1


MBP-lpuerto:~ lpuerto$ pmset -g assertions

18/11/2014 08:37:03 EET

Assertion status system-wide:

BackgroundTask 0

PreventDiskIdle 0

ApplePushServiceTask 0

UserIsActive 1

PreventUserIdleDisplaySleep 0

InteractivePushServiceTask 0

PreventSystemSleep 0

ExternalMedia 0

PreventUserIdleSystemSleep 1

NetworkClientActive 0

Listed by owning process:

pid 100(hidd): [0x0000000a0000016f] 00:25:30 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"

Timeout will fire in 572 secs Action=TimeoutActionRelease

pid 320(Google Chrome): [0x0000000100000165] 00:25:58 NoIdleSleepAssertion named: "WebRTC has active PeerConnections."

No kernel assertions.

Nov 18, 2014 5:32 AM in response to lpuerto

pid 320(Google Chrome): [0x0000000100000165] 00:25:58 NoIdleSleepAssertion named: "WebRTC has active PeerConnections."


You may need to investigate "WebRTC has active PeerConnections" from your assertions report. I did some Google searching and found several reports about sleep issues caused by some Chrome plug-ins.


Perhaps this is your root cause.


I am mostly just throwing ideas at the wall, and seeing what sticks. While I was suggesting the battery is at fault, I would be very happy if it turned out to be software, as in my years of playing with computers, most times when you want to blame the hardware it turns out to be software (except for disk drives which always seem to die on me eventually 🙂 ).

Nov 22, 2014 1:27 AM in response to BobHarris

That was a extension in google chrome. I have fixed it.


Yesterday night I left it to die with a movie running.

lpuerto$ ls -l /var/vm

total 4325376

-rw------T 1 root wheel 1073741824 22 Nov 00:10 sleepimage

-rw------- 1 root wheel 67108864 1 Jan 2001 swapfile0

-rw------- 1 root wheel 1073741824 1 Jan 2001 swapfile1


It is able to create the sleepimage... or at least it tried it. However this morning when I plug it in again, it started from scratch. No loading screen with a progress bar and normal sequence. The only difference is, it asked me for my password, when normally it does not because I have the automatic login to my account enable.


I am thinking to delete everything and install mavericks again. Then load everything from my backup except the system preferences.


The energy and hibernation rules come from the system preferences, not from the user preferences, right?

Other option would be reinstall the system over the one I have here, but I do not really know if it could work. What do you think?

Nov 22, 2014 4:29 AM in response to BobHarris

I have a homemade fusion drive and trim enabled. Perhaps, is one of those things keeping it from load the sleepimage when I plugin the computer?


I do not think the fusion drive have nothing to do with it... but perhaps the triming. I do not thing the fusion have nothing to do with it because I have clean install mavericks and create a empty user account. Then, I saw the system hibernate. I mean, I saw the progress bar for saving the state on disk. I do not know if then it was able to restore from the sleep image. I sent it to the support to change the battery.


Lately I haven't see the bar for saving the sleepimage when it depletes the battery. It just turn to black screen, and have the same behaviour as when I order it to do a regular sleep... but without the blinking light in the front.


Nov 24, 2014 9:08 AM in response to BobHarris

Hey!!!

Thanks a lot for the reply!!!


The funny thing now is I have been able to force the computer to "safe sleep" and wake up it (with loading screen included) using this app http://www.macupdate.com/app/mac/33476/safesleeponce. However, it was before I change the hibernation mode to 25.... before of that, on hibernatemode 3, the app was just able to normaly sleep the computer. I mean, y push a keyboard key and the computer just wake up. But, in that state there was not blinking light in the front. ¿? Standby mode? According to apple my computer do not have standby mode, but it appears as an option in the pmset ¿?.


Anyhow, when I changed to hibernate mode 25 the app was able to fully hibernate... Then, I have change to hibernate mode 3, and continues to be able to fully hibernate.


I have been trying to check if now normally hibernate, but I takes a lot of time to totally run out of battery. I mean, when it last one or two minutes to lost power, it turn itself to sleep. Not deep sleep. If I press a key, the computer try to restart one o two times. If put the power cord, the computer wake up, without loading screen (no reading image from disk) and returned to the state when it lost power. That behaviour last at least one hour or more....


Everything is very strange in general.... I will try to run out of battery tonight, and then I will leave the computer the whole night without plugin.


Let's see.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Computer do not hibernate when battery drained off

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.